<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>健康打卡模块类图</title>
    <script src="https://cdn.jsdelivr.net/npm/mermaid@10.6.1/dist/mermaid.min.js"></script>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/mermaid@10.6.1/dist/mermaid.min.css">
    <style>
        body {
            font-family: 'Arial', sans-serif;
            background-color: #f5f5f5;
            margin: 0;
            padding: 20px;
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        .container {
            background-color: white;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            padding: 20px;
            margin-bottom: 20px;
            max-width: 1100px;
            width: 100%;
        }
        h1 {
            color: #2c3e50;
            text-align: center;
            margin-bottom: 30px;
        }
        .mermaid {
            margin: 30px 0;
            display: flex;
            justify-content: center;
        }
        .mermaid svg {
            max-width: 100%;
            height: auto;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>健康打卡模块类图</h1>
        <div class="mermaid">
            classDiagram
                class HealthCheck {
                    +Long id
                    +Long userId
                    +Double temperature
                    +String symptoms
                    +String location
                    +String healthStatus
                    +String contactHistory
                    +LocalDateTime checkTime
                    +createTime
                    +updateTime
                    +submitCheck()
                    +updateCheck()
                }
                
                class HealthCheckController {
                    +submitCheck()
                    +getCheckHistory()
                    +getCheckStatistics()
                    +getCheckDetail()
                }
                
                class HealthCheckService {
                    +submitCheck()
                    +getCheckHistory()
                    +getCheckStatistics()
                    +getCheckDetail()
                    +validateCheck()
                    +generateReport()
                }
                
                class HealthCheckRepository {
                    +findByUserId()
                    +findByDateRange()
                    +countByStatus()
                    +findLatestByUserId()
                }
                
                class HealthCheckStatistics {
                    +Long userId
                    +Integer totalChecks
                    +Integer normalChecks
                    +Integer abnormalChecks
                    +LocalDate startDate
                    +LocalDate endDate
                    +generateStatistics()
                    +getAbnormalRate()
                }
                
                HealthCheckController --> HealthCheckService : uses
                HealthCheckService --> HealthCheckRepository : uses
                HealthCheckService --> HealthCheckStatistics : uses
                HealthCheckStatistics "1" *-- "N" HealthCheck : analyzes
        </div>
    </div>
    <script>
        mermaid.initialize({
            theme: 'default',
            startOnLoad: true,
            securityLevel: 'loose',
            flowchart: {
                useMaxWidth: false,
                htmlLabels: true
            }
        });
    </script>
</body>
</html> 